package cn.tedu.spring.config;

import cn.tedu.spring.bean.UserDao;
import cn.tedu.spring.file.Database;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.xml.crypto.Data;

public class TestAppConfig {
    public static void main(String[] args) {
        ApplicationContext context=new AnnotationConfigApplicationContext
                (AppConfig.class);
        Database database=context.getBean(Database.class);
        System.out.println(database);
        UserDao userDao=context.getBean(UserDao.class);
        System.out.println(userDao);
    }
}
